package cn.webrx;

import java.util.*;

public class LinkedList1   {
    public static void main(String[] args) {
        LinkedList<String> li = new LinkedList<>();
        //LinkedList<String> li = new LinkedList<>();
        li.add("one");
        li.add(li.size(),"two");
        li.add(0,"three");

        li.addFirst("five");
        li.push("four");

        li.addLast("ten");
        li.add("el");
        System.out.println(li);

        System.out.println(li.remove());
        System.out.println(li.pop());
        System.out.println(li.removeFirst());
        System.out.println(li.removeFirst());
        System.out.println(li.remove(2));
        System.out.println(li.poll());
        System.out.println(li);
        //li.clear();
        //li.size();

        String s1 = new String("123");
        String s2 = new String("321");
        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());


    }
}
